<?php
class ViewModel{
	private $data=array();
	private $view=FALSE;
	function __construct($file){
		//构造完整的文件路径
		if(file_exists($file)){
			$this->view=$file;
		}
	}
	public function assgin($var,$value){
		$this->data[$var]=$value;
	}
	public function display(){
		$data=$this->data;
		//var_dump($this->view);
		include($this->view);
	}
}
?>